<%@page contentType="text/html" pageEncoding="windows-1250" import="arocms.Constans"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="ar"%>

<logic:present name="<%=Constans.NEWS_LIST_PATH%>">
    <html:link action="/News/Form" styleClass="button">Add news</html:link>
    <ar:pager action="/News/List" collection="<%=Constans.NEWS_LIST_PATH%>" pageSize="10" parameterName="kdnfa"/>
    <logic:iterate id="news" name="<%=Constans.NEWS_LIST_PATH%>">
        <h2>${news.title}</h2>
        <p>${news.heading}</p>
        <html:link action="/News/FullArticle" paramName="news" paramProperty="id" paramId="id">More..</html:link>
        <html:link action="/News/Edit" paramName="news" paramProperty="id" paramId="id">Edit</html:link>
        <html:link action="/News/Delete" paramName="news" paramProperty="id" paramId="id">Delete</html:link>
        <hr/>
    </logic:iterate>
</logic:present>